home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
pcl
/
docs.lha
/
latex-CLTL-sty
/
more-info.txt
/
node19_mn.html
< prev
next >
Wrap
Text File
|
1991-07-02
|
2KB
|
78 lines
<H2><A ID="SECTION001101000000000000000">
Constructs for Handling Multiple Values</A>
</H2>
<P>
Normally multiple values are not used. Special forms are
required both to <#2939#><I>produce</I><#2939#> multiple values and to <#2940#><I>receive</I><#2940#> them.
If the caller of a function does not request multiple values,
but the called function produces multiple values, then the first
value is given to the caller and all others are discarded;
if the called function produces zero values, then the caller gets <#2941#><#2941#>
as a value.
<P>
The primary primitive for producing multiple values is <#2942#>values<#2942#>,
which takes any number of arguments and returns that many values. If the
last form in the body of a function is a <#2943#>values<#2943#> with three arguments,
then a call to that function will return three values. Other special
forms also produce multiple values, but they can be described in terms of
<#2944#>values<#2944#>. Some built-in Common Lisp functions, such as <#2945#>floor<#2945#>, return
multiple values; those that do are so documented.
<P>
The special forms and macros for receiving multiple values are as follows:
<BR>
<tex2html_image_mark>#lisp2946#
<BR>
These specify a form to evaluate and an indication of where to put
the values returned by that form.
<P>
<BR>
<tex2html_image_mark>#defun2948#
<BR>
<P>
<BR>
<tex2html_image_mark>#defun2965#
<BR>
<P>
<BR>
<tex2html_image_mark>#defun2970#
<BR>
<P>
<BR>
<tex2html_image_mark>#defmac2980#
<BR>
<P>
<BR>
<tex2html_image_mark>#defspec2988#
<BR>
<P>
<BR>
<tex2html_image_mark>#defspec3000#
<BR>
<P>
<BR>
<tex2html_image_mark>#defmac3009#
<BR>
<P>
<BR>
<tex2html_image_mark>#defmac3021#
<BR>
<P>
<BR>
<tex2html_image_mark>#new3042#
<BR>
<P>